<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>js数据类型</title>
</head>
<body>
    
</body>
<script>
    //弱类型语言
    /*
    六种数据类型:String  number  boolean  null  undefined  Object
    */
    var a=90;
    var b=3.1234;
    var c;//undefined 没定义  未赋值
    var d=true;
    var e='hello JS';
    var f=null;
    var g=new Date();
    var sz1=[1,2,3,4];
    var sz2=new Array();

    function hello(){
        console.log("nihao");
    }
    console.log(typeof a);  //number
    console.log(typeof b);  //number
    console.log(typeof c);  //undefined
    console.log(typeof d);  //boolean
    console.log(typeof e);  //String
    console.log(typeof f);  //object
    console.log(typeof g);  //object
    console.log(typeof sz1);  //object
    console.log(typeof sz2);  //object
    console.log(typeof hello);  //function
    console.log("--------");
    console.log(isNaN("abcd")+"|"+isNaN(123));    //不是一个数字,判断是真是假---->false是数字 true不是
</script>
</html>